//
// Created by 吴锐 on 2022/2/23.
//

#include<iostream>

using namespace std;

int g_a = 10;
int g_b = 10;

const int c_g_a = 10;
const int c_g_b = 10;

int main(){

    int a = 10;
    int b = 10;

    cout << "局部变量a的地址为: " << (long long)&a << endl;
    cout << "局部变量a的地址为: " << (long long)&b << endl;

    cout << "全局变量a的地址为: " << (long long)&g_a << endl;
    cout << "全局变量b的地址为: " << (long long)&g_b << endl;

    static int s_a = 10;
    static int s_b = 10;

    cout << "静态变量a的地址为: " << (long long)&s_a << endl;
    cout << "静态变量b的地址为: " << (long long)&s_b << endl;

    cout << "字符串常量的地址为: " << (long long)&"hello world" << endl;

    cout << "全局常量c_g_a的地址为" << (long long)&c_g_a << endl;
    cout << "全局常量c_g_b的地址为" << (long long)&c_g_b << endl;

    const int c_l_a = 10;
    const int c_l_b = 10;

    cout << "局部常量a的地址为: " << (long long)&c_l_a << endl;
    cout << "局部常量b的地址为: " << (long long)&c_l_b << endl;

    return 0;
}